import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class demo1 {
    static List<Integer> path = new ArrayList<>();
    static List<List<Integer>> result = new ArrayList<>();
    public  static void backTracking(int index, int n, int m, int sum) {
        if (m == sum) {
            result.add(new ArrayList<>(path));
            return;
        }
        for (int i = index; i <= n ; i++) {
            if (sum + i > m) {
                break;
            }
            sum += i;
            path.add(i);
            backTracking(i + 1, n, m, sum);
            sum -= i;
            path.remove(path.size() - 1);
        }
    }
    public static  void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int m = in.nextInt();
            backTracking(1, n, m, 0);
            for(int i = 0;i < result.size(); i++){
                for(int j= 0; j < result.get(i).size(); j++){
                    System.out.print(result.get(i).get(j)+" ");
                }
                System.out.println();
            }
        }
    }
}